package com.github.gexiao.middleware.whitelist.annotation;

import com.github.gexiao.middleware.whitelist.Location;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 白名单注解
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
public @interface DoWhiteList {
    /**
     * 拦截的key
     *
     * @return
     */
    String key() default "";

    /**
     * 返回消息
     *
     * @return
     */
    String msg() default "非法用户，拒绝访问";

    Location location() default Location.parameter;
}
